<template>
  <div>
    <left-part @orgClick="clickTree"></left-part>
    <map-vieww :list="list" ref="mapView"></map-vieww>
  </div>
</template>

<script>
import LeftPart from "../../components/map/left-part.vue";
import mapVieww from "../../components/map/map.vue";
export default {
  components: { LeftPart, mapVieww },
  data() {
    return {
      list: [],
    };
  },
  methods: {
    clickTree(val) {
      console.log(val);

      this.list = val.list;
      // 区分机构点击、相机点击
      const camId = val["camId"];
      if (camId != null && camId != undefined && camId !== "") {
        this.$refs.mapView.refreshCamera(val);
      } else {
        // 查询机构相机 聚合打点
        this.$refs.mapView.clusterReady(val);
      }
    },
  },
};
</script>

<style>
</style>